import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('personCond.csv',encoding='gbk')
income=df['收入'].tolist()
job=df['职业'].tolist()

education=df['学历水平'].tolist()
ret=df['是否生育'].tolist()

import random
def getRand():
    return random.randint(-50,50)/100

x1=[]
y1=[]
x2=[]
y2=[]
for i in range(len(income)):
    if ret[i]==0:
        x1.append(job[i]+getRand())
        y1.append(education[i]+getRand())
    else:
        x2.append(job[i]+getRand())
        y2.append(education[i]+getRand())

plt.scatter(x1, y1, c='red')
plt.scatter(x2, y2, c='blue')
plt.xlabel('job')
plt.ylabel('education')
plt.show()